package ooexercise04;
public class Fish extends Animal implements Swim{
    Fish(String name,String color,int age){
        super(name,color,age);
    }

    public void swim(){
        System.out.println(color+"色的"+age+"岁小鱼"+name+"在游泳……");
    }

    void eat(){
        System.out.println(color+"色的"+age+"岁小鱼"+name+"在吃虾米……");
    }
}



/*
public class Fish extends Animal implements Swim{
    Fish(String name,String color,int age){
        super(name,color,age);
    }

    void eat(){
        System.out.println(color+"色的"+age+"岁小鱼"+name+"在吃虾米……");
    }

    public void swim(){
        System.out.println(color+"色的"+age+"岁小鱼"+name+"在游泳……");
    }
}

 */
